<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="__PUBLIC__/Admin/images/Admin_css.css" type="text/css" rel="stylesheet">
<link rel="shortcut icon" href="__PUBLIC__/Admin/images/myfav.ico" type="image/x-icon" />
<script src="__PUBLIC__/Admin/js/admin.js"></script>
<script src="__PUBLIC__/Admin/js/Jquery.js"></script>
<script charset="utf-8" src="__PUBLIC__/Editor/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="__PUBLIC__/Editor/kindeditor/lang/zh_CN.js"></script>
<script charset="utf-8" src="__PUBLIC__/Common/artDialog/jquery.artDialog.js?skin=green"></script>
<script charset="utf-8" src="__PUBLIC__/Common/artDialog/extend.js"></script>
<link href="__PUBLIC__/Editor/kindeditor/themes/default/default.css" type="text/css" rel="stylesheet"/>
<script>
var channelArray = new Array();
	<volist name="modellist" id="vo">
	channelArray[{$vo.id}] = "{$vo.nid}";
	</volist>
</script>
<script>
   var editor;
        KindEditor.ready(function(K) {
                editor = K.create('#ocontent',{
				items : [
		'source', '|', 'undo', 'redo', '|', 'print', 'template', 'code', 'cut', 'copy', 'paste',
		'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
		'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
		'superscript', 'clearhtml', 'quickformat', 'selectall', 'preview','fullscreen','/',
		'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
		'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
		'flash', 'media', 'insertfile','multifile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
		'anchor', 'link', 'unlink',
	],
				allowFileManager : true
				});
          K('#litpic-up').click(function() {
					editor.loadPlugin('image', function() {
						if(K('#litpic').val()=='')
						{
							editor.plugin.imageDialog({
							imageUrl : K('#litpic').val(),
							clickFn : function(url, title, width, height, border, align) {
									K('#litpic').val(url);
									if(width!='')width = ' width="' + width +'"';
									if(title!='') title = ' title="' + title +'" alt="'+title+'"';
									if(height!='') height = ' height="' + height +'"';
									if(align!='') align = ' align="' + align +'"';
									if(border!='') border = ' border="' + border +'"';
									if(url!=''){
									editor_Content.insertHtml('<img '+title + width + height + align + 'src="'+url+'"/>');
									K('#flag-p').attr('checked','checked');
									}
									else
									{
										K('#flag-p').removeAttr('checked');
									}
									editor.hideDialog();
								}
							});
						}
						else
						{
							editor.plugin.imageDialog({
							imageUrl : K('#litpic').val(),
							clickFn : function(url, title, width, height, border, align) {
									K('#litpic').val(url);
									K('#flag-p').attr('checked','checked');
									editor.hideDialog();
								}
							});
						}
						
					});
				});

        }); 
	function CheckForm()
	{ 
		if(EmptyCheckForm('otypename','栏目名称不能为空!','')) return false;
		if(EmptyCheckForm('osortrank','栏目排序不能为空!',''))return false;
	}
	function EmptyCheckForm(id,value,set)
	{
		if($('#'+id).val()==set)
		{
			$.dialog({icon:'warning',content:value,ok:function(){ $('#' + id).focus();}});return true;
		}
		return false;
	}
function getlink(i)
{
	if(i==1 && document.getElementById("getlink").style.display =='none')
	{
		document.getElementById("getlink").style.display ='';
	}
	if(i==0)
	{
		document.getElementById("getlink").style.display ='none';
	}
}
function killErrors() {
return true;
}
window.onerror = killErrors;
function ParTemplet(obj)
{
  var sevvalue = channelArray[obj.value];
  var tempindex = document.getElementsByName('tempindex');
  var templist = document.getElementsByName('templist');
  var temparticle = document.getElementsByName('temparticle');
  var waptempindex = document.getElementsByName('waptempindex');
  var waptemplist = document.getElementsByName('waptemplist');
  var waptemparticle = document.getElementsByName('waptemparticle');
  var dfstyleValue = '{style}';
  var wapdfstyleValue = '{wapstyle}';
  tempindex[0].value = dfstyleValue+"/index_"+sevvalue+".htm";
  templist[0].value = dfstyleValue+"/list_"+sevvalue+".htm";
  temparticle[0].value = dfstyleValue+"/article_"+sevvalue+".htm";
  waptempindex[0].value = wapdfstyleValue+"/index_"+sevvalue+".htm";
  waptemplist[0].value = wapdfstyleValue+"/list_"+sevvalue+".htm";
  waptemparticle[0].value = wapdfstyleValue+"/article_"+sevvalue+".htm";
}
</script>
</head>
<body>
<form action="{:U('Type/doadd')}" method="post" onsubmit="return CheckForm()">
<table width="100%" class="admintable">
<tr><td class="admintitle"><span style="float:right;"><a href="{:U('Type/index')}">[栏目列表]</a></span>添加栏目</td></tr>
</table>
<div class="nTableft admintable">
	<div class="TabTitleleft">
      		<ul id="myTab1">
					<li class="active" onClick="nTabs(this,0);" style="width:{$_i+97/3}%">常规选项</li>
					<li class="normal" onClick="nTabs(this,1);" style="width:{$_i+97/3}%">高级选项</li>
					<li class="normal" onClick="nTabs(this,2);" style="width:{$_i+97/3}%">栏目内容</li>
      		</ul>
    	</div>
<div id="myTab1_Content0"  style="clear:both;">
<table width="100%" border="0"  align="center" cellpadding="3" cellspacing="1" style="margin:5px 0;background:#FFF">
<tr onMouseOver="this.style.backgroundColor='#EEFCDD';this.style.color='red'" onMouseOut="this.style.backgroundColor='';this.style.color=''">
<td width="30%" align="left">内容模型
				<div id='hmodelid' style="color:#ccc;letter-spacing: 0px;font-size:12px;"></div>
</td>
	<td width="70%" align="left">
	<select class='css_select' name="modelid" type="text" id="omodelid" onFocus="hmodelid.style.color='blue';" onBlur="hmodelid.style.color='#ccc';" style="width:auto;" onChange="ParTemplet(this)">
	<volist name="modellist" id="vo">
	<option value="{$vo.id}" <?php if($vo['id']==$modelid):echo "selected='selected'";endif;?>>{$vo.typename}|{$vo.nid}</option>
	</volist>
	</select>
	</td>
	</tr>
<tr onMouseOver="this.style.backgroundColor='#EEFCDD';this.style.color='red'" onMouseOut="this.style.backgroundColor='';this.style.color=''">
<td width="30%" align="left">所属栏目
				<div id='fid' style="color:#ccc;letter-spacing: 0px;font-size:12px;"></div>
</td>
	<td width="70%" align="left">
	<select class='css_select' name="fid" type="text" id="ofid" onFocus="hmodelid.style.color='blue';" onBlur="hmodelid.style.color='#ccc';" style="width:auto;" >
	<option value='0'>做为顶级分类</option>
<volist name="selecttreelist" id="vo">
<option value='{$vo.id}' {$vo.selected}><php>
for($i=0;$i<$vo['count']*4;$i++){
echo '&nbsp;';
}
</php><neq name='vo.fid' value='0'> &nbsp;-|&nbsp;</neq>{$vo.typename}</option></volist></select>
	</select>
	</td>
	</tr>
<tr onMouseOver="this.style.backgroundColor='#EEFCDD';this.style.color='red'" onMouseOut="this.style.backgroundColor='';this.style.color=''">
<td width="30%" align="left">栏目名称
				<div id='htypename' style="color:#ccc;letter-spacing: 0px;font-size:12px;"></div>
</td>
	<td width="70%" align="left">
		<input name="typename" type="text" id="otypename" onFocus="htypename.style.color='blue';" onBlur="htypename.style.color='#ccc';" value="" style="width:50%;"/>&nbsp;* 支持批量添加，多个栏目半角逗号隔开
	</td>
	</tr>
<tr onMouseOver="this.style.backgroundColor='#EEFCDD';this.style.color='red'" onMouseOut="this.style.backgroundColor='';this.style.color=''">
<td width="30%" align="left">排列顺序
				<div id='hsortrank' style="color:#ccc;letter-spacing: 0px;font-size:12px;"></div>
</td>
	<td width="70%" align="left">
		<input name="sortrank" type="text" id="osortrank" onFocus="hsortrank.style.color='blue';" onBlur="hsortrank.style.color='#ccc';" value="50" style="width:50%;"/>&nbsp;* 支持批量添加，多个排序半角逗号隔开
	</td>
	</tr>
<tr>
<td width="30%" align="left">栏目属性
				<div id='hmodeltype' style="color:#ccc;letter-spacing: 0px;font-size:12px;"></div>
</td>
	<td width="70%" align="left">
		<input name='modeltype' type='radio' class='noborder' value='0' onclick="getlink(0)" checked='checked'/>最终列表栏目（允许在本栏目发布文档，并生成文档列表）<br/>
		<input name='modeltype' type='radio' class='noborder' value='1' onclick="getlink(0)"/>频道封面（栏目本身不允许发布文档）<br/>	
		<input name='modeltype' type='radio' class='noborder' value='2' onclick="getlink(1)"/>外部链接（跳转到外部地址）<br/>
		<div style="display:none;" id='getlink'>外部链接地址：<input name="linkurl" type="text" value="" style="width:200px;"/></div>
	</td>
	</tr>
    <tr onMouseOver="this.style.backgroundColor='#EEFCDD';this.style.color='red'" onMouseOut="this.style.backgroundColor='';this.style.color=''">
<td width="30%" align="left">是否隐藏
				<div id='hstatus' style="color:#ccc;letter-spacing: 0px;font-size:12px;"></div>
</td>
	<td width="70%" align="left">
        <input name='display' type='radio' class='noborder' value='0' checked='checked'/>显示 
		<input name='display' type='radio' class='noborder' value='1'/>隐藏
        <input name='display' type='radio' class='noborder' value='2'/>flash显示
        <input name='display' type='radio' class='noborder' value='3'/>wap显示
        <input name='display' type='radio' class='noborder' value='4'/>文件夹
	</td>
	</tr>
</table>
</div>




<div id="myTab1_Content1"  style="clear:both;" class='none'>
<table width="100%" border="0"  align="center" cellpadding="3" cellspacing="1" style="margin:5px 0;background:#FFF">
<tr onMouseOver="this.style.backgroundColor='#EEFCDD';this.style.color='red'" onMouseOut="this.style.backgroundColor='';this.style.color=''">
  <td width="30%" align="left">栏目缩略图</td>
  <td width="70%" align="left"><input name="litpic" type="text" id="litpic" size="50" maxlength="200" value=""/> <input type="button" id="litpic-up" value="选择图片" /></td>
</tr>
<tr onMouseOver="this.style.backgroundColor='#EEFCDD';this.style.color='red'" onMouseOut="this.style.backgroundColor='';this.style.color=''">
<td width="30%" align="left">封面模板
				<div id='htempindex' style="color:#ccc;letter-spacing: 0px;font-size:12px;"></div>
</td>
	<td width="70%" align="left">
		<input name="tempindex" type="text" id="otempindex" onFocus="htempindex.style.color='blue';" onBlur="htempindex.style.color='#ccc';" value="{style}/index_{$modelname}.htm" style="width:300px;"/>
	</td>
	</tr>

	<tr onMouseOver="this.style.backgroundColor='#EEFCDD';this.style.color='red'" onMouseOut="this.style.backgroundColor='';this.style.color=''">
<td width="30%" align="left">列表模板
				<div id='htemplist' style="color:#ccc;letter-spacing: 0px;font-size:12px;"></div>
</td>
	<td width="70%" align="left">
		<input name="templist" type="text" id="otemplist" onFocus="htemplist.style.color='blue';" onBlur="htemplist.style.color='#ccc';" value="{style}/list_{$modelname}.htm" style="width:300px;"/>
	</td>
	</tr>
	
	
	<tr onMouseOver="this.style.backgroundColor='#EEFCDD';this.style.color='red'" onMouseOut="this.style.backgroundColor='';this.style.color=''">
<td width="30%" align="left">文章模板
				<div id='htemparticle' style="color:#ccc;letter-spacing: 0px;font-size:12px;"></div>
</td>
	<td width="70%" align="left">
		<input name="temparticle" type="text" id="otemparticle" onFocus="htemparticle.style.color='blue';" onBlur="htemparticle.style.color='#ccc';" value="{style}/article_{$modelname}.htm" style="width:300px;"/>
	</td>
	</tr>
	
	
	<tr onMouseOver="this.style.backgroundColor='#EEFCDD';this.style.color='red'" onMouseOut="this.style.backgroundColor='';this.style.color=''">
<td width="30%" align="left">WAP封面模板
				<div id='hwaptempindex' style="color:#ccc;letter-spacing: 0px;font-size:12px;"></div>
</td>
	<td width="70%" align="left">
		<input name="waptempindex" type="text" id="owaptempindex" onFocus="hwaptempindex.style.color='blue';" onBlur="hwaptempindex.style.color='#ccc';" value="{wapstyle}/index_{$modelname}.htm" style="width:300px;"/>
	</td>
	</tr>

	<tr onMouseOver="this.style.backgroundColor='#EEFCDD';this.style.color='red'" onMouseOut="this.style.backgroundColor='';this.style.color=''">
<td width="30%" align="left">WAP列表模板
				<div id='hwaptemplist' style="color:#ccc;letter-spacing: 0px;font-size:12px;"></div>
</td>
	<td width="70%" align="left">
		<input name="waptemplist" type="text" id="owaptemplist" onFocus="hwaptemplist.style.color='blue';" onBlur="hwaptemplist.style.color='#ccc';" value="{wapstyle}/list_{$modelname}.htm" style="width:300px;"/>
	</td>
	</tr>
	
	
	<tr onMouseOver="this.style.backgroundColor='#EEFCDD';this.style.color='red'" onMouseOut="this.style.backgroundColor='';this.style.color=''">
<td width="30%" align="left">WAP文章模板
				<div id='hwaptemparticle' style="color:#ccc;letter-spacing: 0px;font-size:12px;"></div>
</td>
	<td width="70%" align="left">
		<input name="waptemparticle" type="text" id="owaptemparticle" onFocus="hwaptemparticle.style.color='blue';" onBlur="hwaptemparticle.style.color='#ccc';" value="{wapstyle}/article_{$modelname}.htm" style="width:300px;"/>
	</td>
	</tr>
	
	
	
	
<tr onMouseOver="this.style.backgroundColor='#EEFCDD';this.style.color='red'" onMouseOut="this.style.backgroundColor='';this.style.color=''">
<td width="30%" align="left">SEO标题
				<div id='hseotitle' style="color:#ccc;letter-spacing: 0px;font-size:12px;"></div>
</td>
	<td width="70%" align="left">
		<input name="seotitle" type="text" id="oseotitle" onFocus="hseotitle.style.color='blue';" onBlur="hseotitle.style.color='#ccc';" value="" style="width:300px;">
	(栏目模板里用{:htmlentities('<wk:field name="seotitle" />')}调用) 
	</td>
	</tr>
	
<tr onMouseOver="this.style.backgroundColor='#EEFCDD';this.style.color='red'" onMouseOut="this.style.backgroundColor='';this.style.color=''">
<td width="30%" align="left">关键词
				<div id='hkeywords' style="color:#ccc;letter-spacing: 0px;font-size:12px;"></div>
</td>
	<td width="70%" align="left">
		<input name="keywords" type="text" id="okeywords" onFocus="hkeywords.style.color='blue';" onBlur="hkeywords.style.color='#ccc';" value="" style="width:300px;">
	</td>
	</tr>
	

<tr onMouseOver="this.style.backgroundColor='#EEFCDD';this.style.color='red'" onMouseOut="this.style.backgroundColor='';this.style.color=''">
<td width="30%" align="left">描述
				<div id='hdescription' style="color:#ccc;letter-spacing: 0px;font-size:12px;"></div>
</td>
	<td width="70%" align="left">
	<textarea class='css_textarea' name="description" type="text" id="odescription" onFocus="hdescription.style.color='blue';" onBlur="hdescription.style.color='#ccc';" cols="50" rows="5" ></textarea>	
	</td>
	</tr>
</table>
</div>






<div id="myTab1_Content2"  style="clear:both;" class='none'>
<table width="100%" border="0"  align="center" cellpadding="3" cellspacing="1" style="margin:5px 0;background:#FFF">

<tr>
<td width="100%" align="center">	说明：栏目内容是替代原来栏目单独页的更灵活的一种方式，可在栏目模板中用{:htmlentities('<wk:field name="content" />')}调用，通常用于企业简介之类的用途。</td>
</tr>
<tr>
	<td width="100%" align="center">
	<textarea class='css_textarea' name="content" type="text" id="ocontent" style="width:100%;height:300px;"></textarea>	
	</td>
	</tr>

</table>
</div>



</div>
<tr class="css_page_list">
			<td height="30" colspan=2 align="center">
		  <input name='Submit' type='submit' class="bnt" value=' 提 交 '>&nbsp;&nbsp;&nbsp;&nbsp;
		  <input name='button' type='button' class="bnt" value=' 返 回 ' onclick="window.location.href='{:U('Type/index')}'"></td>
		</tr>
<input type="hidden" name="_from" value="{:curPageURL()}"/>
</form>
<div style="text-align:center;margin:10px;">
<hr>
<include file="Index:copy" />  
</div>
</body>
</html>